package models

// 锦鲤活动 会员表
type MaLotteryMember struct {
	ID         string `gorm:"primaryKey;column:id;type:bigint unsigned;not null;comment:唯一ID" json:"id" json_old:"ID"`
	Phone      string `gorm:"column:phone;type:varchar(11);not null;default:'';comment:手机号" json:"phone"`
	ActivityID string `gorm:"column:activity_id;type:bigint;;comment:活动ID" json:"activity_id"`
	SalesID    string `gorm:"column:sales_id;type:varchar(50);not null;comment:活动ID" json:"sales_id"`
	OutTradeNo string `gorm:"column:out_trade_no;type:varchar(50);comment:订单号" json:"out_trade_no"`
	Status     int    `gorm:"column:status;type:tinyint(1);default:1;comment:会员状态 1启用 2禁用" json:"status"`
	Name       string `gorm:"column:name;type:varchar(20);not null;comment:会员名称" json:"name"`
	ProvinceID string `gorm:"column:province_id;type:int;default:null;comment:省份ID" json:"province_id"`
	CityID     string `gorm:"column:city_id;type:int;default:null;comment:获客城市" json:"city_id"`

	// 抽奖次数
	LotteryTimes int `gorm:"column:lottery_times;type:int;" json:"lottery_times"`
	// 中奖次数
	WinTimes int `gorm:"column:win_times;type:int" json:"win_times"`

	CreatedAt int64 `gorm:"column:created_at;autoCreateTime;type:int;size:64;comment:创建时间" json:"created_at"`
	UpdatedAt int64 `gorm:"column:updated_at;autoUpdateTime;type:int;size:64;comment:修改时间" json:"updated_at"`
	DeletedAt int64 `gorm:"column:deleted_at;default:0;type:int;size:64;comment:删除时间" json:"deleted_at"`
}

func (m MaLotteryMember) TableName() string {
	return "ma_lottery_member"
}
